package com.example.v2.controller;

import com.example.v2.model.common.JsonResult;
import com.example.v2.model.dto.SpringbootDemoDTO;
import com.example.v2.service.DemoService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * @Author DongXL
 * @Create 2017-12-15 18:30
 */
@RestController
public class DemoController {
    @Resource
    private DemoService demoService;

    @GetMapping("/example1")
    public JsonResult<List<SpringbootDemoDTO>> example1() {
        return JsonResult.createSuccessResult(demoService.getSpringbootDemoList());
    }

}
